﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using WMS.FC.Domain.PersistenceObject.Business;
using WMS.FC.Infrastructure.Common;

namespace WMS.FC.Infrastructure.POConfig.Business
{
    public class QualityPlanConfig : POBaseConfig<QualityPlanPO>
    {
        public override void InitializeData(EntityTypeBuilder<QualityPlanPO> builder)
        {
        }

        public override void MapColumn(EntityTypeBuilder<QualityPlanPO> builder, ref int index)
        {
            builder.HasComment("质检计划表");
            builder.Property(entity => entity.LineCode).ConfigColumn("LINE_CODE", "产线编码", 50, true).HasColumnOrder(index++);
            builder.Property(entity => entity.StationCode).ConfigColumn("STATION_CODE", "站台编码", 50, true).HasColumnOrder(index++);
            builder.Property(entity => entity.RankValue).ConfigColumn("RANK_VALUE", "分选等级", 50, true).HasColumnOrder(index++);
            builder.Property(entity => entity.TrayLimit).ConfigColumn("TRAY_LIMIT", "托盘上限").HasColumnOrder(index++);
            builder.Property(entity => entity.TrayCount).ConfigColumn("TRAY_COUNT", "托盘计数").HasColumnOrder(index++);
            builder.Property(entity => entity.WarehouseCode).ConfigColumn("WAREHOUSE_CODE", "仓库编码", 50, true).HasColumnOrder(index++);
        }

        public override void MapIndex(EntityTypeBuilder<QualityPlanPO> builder)
        {
        }
    }
}
